#ifndef __SPRITE_H_
#define __SPRITE_H_

#include <qpixmap.h>
#include <qpainter.h>

#include<iostream>
using namespace std;
#include<cmath>

#define PI	3.14159265359

class Sprite
{
	public:
		int x,y,w,h;
		float ang;
		int angD;
		bool isVisable;
		QPixmap pix;
		Sprite(int, int, int, int, bool);
		~Sprite();
		QColor color;
		void setGeometry(int x1, int y1, int w1, int h1);
		void setAng(float ang);
		void setAngD(int angD);
		void setPosition(int x1, int y1);
		void setColor(QColor c);
		virtual void paint(QPixmap &pix) = 0;
};

class BoxSprite : public Sprite
{
	public:
		BoxSprite(int, int, int, int, bool);
		~BoxSprite();
		virtual void paint(QPixmap &pix);
};

class EllipseSprite : public Sprite
{
	public:
		float r;
		EllipseSprite(int, int, int, int, bool);
		~EllipseSprite();
		virtual void paint(QPixmap &pix);
};

class PolySprite : public Sprite
{
	public:
		QPointArray pa;
		PolySprite(int x, int y, QPointArray &p, bool);
		~PolySprite();
		virtual void paint(QPixmap &pix);
};

#endif /* __SPRITE_H_ */

